-
-
Notifications
You must be signed in to change notification settings - Fork 91
[19.0] [MIG] endpoint_route_handler: Migration to 19.0 #117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 19.0
Are you sure you want to change the base?
Conversation
When an endpoint is archived it must be dropped. When it's unarchive it must be restored.
Routing maps are generated **per env** which means that every new env will have its own routing map attached to `ir.http` registry class. This is not desired (as per core Odoo comment) but it's like this today :/ Hence, before this change, the routing map could be mis-aligned across different envs leading to random responses for custom endpoints. This refactoring simplifies a lot the handling of the rules leaving to std `_generate_routing_rules` the duty to yield rules and to `routing_map` to generate them for the new route map. EndpointRegistry memory consumption is improved too thanks to smaller data to store and to the usage of __slots__.
To avoid multiple invalidation of all envs on each edit or create of persistent records, a new flag is introduced: 'registry_sync'. This flag delays the sync of the rule registry till manual action occurs. Records in the UI are decorated accordingly to notify users of the need to reflect changes on ther registry to make them effective. The sync happens in a post commit hook to ensure all values are in place for the affected records.
Depending on your modules inheritance and upgrade order when you introduce this mixin on an existing model it might happen that gets called before the model's table is ready (eg: another odoo service loading the env before the upgrade happens). Let if fail gracefully since the hook will be called again later.
As routes are registered automatically in the db after sync there's no reason to look for non registered routes at boot. Furthermore, this is causing access conflicts on the table when multiple instances w/ multiple workers are spawned.
Empty group_id in acl is deprecated. see odoo/odoo@ce1a4a2
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: web-api-18.0/web-api-18.0-endpoint_route_handler Translate-URL: https://translation.odoo-community.org/projects/web-api-18-0/web-api-18-0-endpoint_route_handler/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: web-api-18.0/web-api-18.0-endpoint_route_handler Translate-URL: https://translation.odoo-community.org/projects/web-api-18-0/web-api-18-0-endpoint_route_handler/
Currently translated at 100.0% (29 of 29 strings) Translation: web-api-18.0/web-api-18.0-endpoint_route_handler Translate-URL: https://translation.odoo-community.org/projects/web-api-18-0/web-api-18-0-endpoint_route_handler/it/
Currently translated at 100.0% (29 of 29 strings) Translation: web-api-18.0/web-api-18.0-endpoint_route_handler Translate-URL: https://translation.odoo-community.org/projects/web-api-18-0/web-api-18-0-endpoint_route_handler/zh_CN/
6c28e16 to
a1015b3
Compare
lmignon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with OCA/rest-framework#569
a1015b3 to
629c09c
Compare
AlisherKaziz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed and compliant with OCA migration standards for Odoo 19.0
|
This PR has the |
| @@ -1,4 +1 @@ | |||
| from . import endpoint_route_sync_mixin | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these are not wizards, please keep them here
No description provided.